\(\int f^{a+b x} \cos ^3(d+e x+f x^2) \, dx\) [115]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 21, antiderivative size = 340 \[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=-\frac {3}{16} \sqrt [4]{-1} e^{\frac {1}{4} i \left (4 d+\frac {(i e+b \log (f))^2}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt [4]{-1} (i e+2 i f x+b \log (f))}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) e^{3 i d+\frac {i (3 i e+b \log (f))^2}{12 f}} f^{-\frac {1}{2}+a} \sqrt {\frac {\pi }{6}} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (3 i e+6 i f x+b \log (f))}{\sqrt {6} \sqrt {f}}\right )-\frac {3}{16} \sqrt [4]{-1} e^{-i d+\frac {i (e+i b \log (f))^2}{4 f}} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erfi}\left (\frac {\sqrt [4]{-1} (i e+2 i f x-b \log (f))}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) e^{-3 i d+\frac {i (3 e+i b \log (f))^2}{12 f}} f^{-\frac {1}{2}+a} \sqrt {\frac {\pi }{6}} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (3 i e+6 i f x-b \log (f))}{\sqrt {6} \sqrt {f}}\right ) \]

[Out]

(-1/96-1/96*I)*exp(3*I*d+1/12*I*(3*I*e+b*ln(f))^2/f)*f^(-1/2+a)*erf((1/12+1/12*I)*(3*I*e+6*I*f*x+b*ln(f))*6^(1
/2)/f^(1/2))*6^(1/2)*Pi^(1/2)-(1/96+1/96*I)*exp(-3*I*d+1/12*I*(3*e+I*b*ln(f))^2/f)*f^(-1/2+a)*erfi((1/12+1/12*
I)*(3*I*e+6*I*f*x-b*ln(f))*6^(1/2)/f^(1/2))*6^(1/2)*Pi^(1/2)-3/16*(-1)^(1/4)*exp(1/4*I*(4*d+(I*e+b*ln(f))^2/f)
)*f^(-1/2+a)*erf(1/2*(-1)^(1/4)*(I*e+2*I*f*x+b*ln(f))/f^(1/2))*Pi^(1/2)-3/16*(-1)^(1/4)*exp(-I*d+1/4*I*(e+I*b*
ln(f))^2/f)*f^(-1/2+a)*erfi(1/2*(-1)^(1/4)*(I*e+2*I*f*x-b*ln(f))/f^(1/2))*Pi^(1/2)

Rubi [A] (verified)

Time = 0.63 (sec) , antiderivative size = 340, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {4561, 2325, 2266, 2235, 2236} \[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=-\frac {3}{16} \sqrt [4]{-1} \sqrt {\pi } f^{a-\frac {1}{2}} e^{\frac {1}{4} i \left (4 d+\frac {(b \log (f)+i e)^2}{f}\right )} \text {erf}\left (\frac {\sqrt [4]{-1} (b \log (f)+i e+2 i f x)}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) \sqrt {\frac {\pi }{6}} f^{a-\frac {1}{2}} e^{\frac {i (b \log (f)+3 i e)^2}{12 f}+3 i d} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (b \log (f)+3 i e+6 i f x)}{\sqrt {6} \sqrt {f}}\right )-\frac {3}{16} \sqrt [4]{-1} \sqrt {\pi } f^{a-\frac {1}{2}} e^{\frac {i (e+i b \log (f))^2}{4 f}-i d} \text {erfi}\left (\frac {\sqrt [4]{-1} (-b \log (f)+i e+2 i f x)}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) \sqrt {\frac {\pi }{6}} f^{a-\frac {1}{2}} e^{\frac {i (3 e+i b \log (f))^2}{12 f}-3 i d} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (-b \log (f)+3 i e+6 i f x)}{\sqrt {6} \sqrt {f}}\right ) \]

[In]

Int[f^(a + b*x)*Cos[d + e*x + f*x^2]^3,x]

[Out]

(-3*(-1)^(1/4)*E^((I/4)*(4*d + (I*e + b*Log[f])^2/f))*f^(-1/2 + a)*Sqrt[Pi]*Erf[((-1)^(1/4)*(I*e + (2*I)*f*x +
 b*Log[f]))/(2*Sqrt[f])])/16 - (1/16 + I/16)*E^((3*I)*d + ((I/12)*((3*I)*e + b*Log[f])^2)/f)*f^(-1/2 + a)*Sqrt
[Pi/6]*Erf[((1/2 + I/2)*((3*I)*e + (6*I)*f*x + b*Log[f]))/(Sqrt[6]*Sqrt[f])] - (3*(-1)^(1/4)*E^((-I)*d + ((I/4
)*(e + I*b*Log[f])^2)/f)*f^(-1/2 + a)*Sqrt[Pi]*Erfi[((-1)^(1/4)*(I*e + (2*I)*f*x - b*Log[f]))/(2*Sqrt[f])])/16
 - (1/16 + I/16)*E^((-3*I)*d + ((I/12)*(3*e + I*b*Log[f])^2)/f)*f^(-1/2 + a)*Sqrt[Pi/6]*Erfi[((1/2 + I/2)*((3*
I)*e + (6*I)*f*x - b*Log[f]))/(Sqrt[6]*Sqrt[f])]

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2236

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erf[(c + d*x)*Rt[(-b)*Log[F],
 2]]/(2*d*Rt[(-b)*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 2266

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2325

Int[(u_.)*(F_)^(v_)*(G_)^(w_), x_Symbol] :> With[{z = v*Log[F] + w*Log[G]}, Int[u*NormalizeIntegrand[E^z, x],
x] /; BinomialQ[z, x] || (PolynomialQ[z, x] && LeQ[Exponent[z, x], 2])] /; FreeQ[{F, G}, x]

Rule 4561

Int[Cos[v_]^(n_.)*(F_)^(u_), x_Symbol] :> Int[ExpandTrigToExp[F^u, Cos[v]^n, x], x] /; FreeQ[F, x] && (LinearQ
[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {1}{8} e^{-3 i \left (d+e x+f x^2\right )} f^{a+b x}+\frac {3}{8} \exp \left (2 i d+2 i e x+2 i f x^2-3 i \left (d+e x+f x^2\right )\right ) f^{a+b x}+\frac {3}{8} \exp \left (4 i d+4 i e x+4 i f x^2-3 i \left (d+e x+f x^2\right )\right ) f^{a+b x}+\frac {1}{8} \exp \left (6 i d+6 i e x+6 i f x^2-3 i \left (d+e x+f x^2\right )\right ) f^{a+b x}\right ) \, dx \\ & = \frac {1}{8} \int e^{-3 i \left (d+e x+f x^2\right )} f^{a+b x} \, dx+\frac {1}{8} \int \exp \left (6 i d+6 i e x+6 i f x^2-3 i \left (d+e x+f x^2\right )\right ) f^{a+b x} \, dx+\frac {3}{8} \int \exp \left (2 i d+2 i e x+2 i f x^2-3 i \left (d+e x+f x^2\right )\right ) f^{a+b x} \, dx+\frac {3}{8} \int \exp \left (4 i d+4 i e x+4 i f x^2-3 i \left (d+e x+f x^2\right )\right ) f^{a+b x} \, dx \\ & = \frac {1}{8} \int \exp \left (-3 i d-3 i f x^2+a \log (f)-x (3 i e-b \log (f))\right ) \, dx+\frac {1}{8} \int \exp \left (3 i d+3 i f x^2+a \log (f)+x (3 i e+b \log (f))\right ) \, dx+\frac {3}{8} \int \exp \left (-i d-i f x^2+a \log (f)-x (i e-b \log (f))\right ) \, dx+\frac {3}{8} \int \exp \left (i d+i f x^2+a \log (f)+x (i e+b \log (f))\right ) \, dx \\ & = \frac {1}{8} \exp \left (-3 i d+a \log (f)-\frac {i (-3 i e+b \log (f))^2}{12 f}\right ) \int e^{\frac {i (-3 i e-6 i f x+b \log (f))^2}{12 f}} \, dx+\frac {1}{8} \left (3 e^{-i d+\frac {i (e+i b \log (f))^2}{4 f}} f^a\right ) \int e^{\frac {i (-i e-2 i f x+b \log (f))^2}{4 f}} \, dx+\frac {1}{8} \left (3 e^{\frac {1}{4} i \left (4 d+\frac {(i e+b \log (f))^2}{f}\right )} f^a\right ) \int e^{-\frac {i (i e+2 i f x+b \log (f))^2}{4 f}} \, dx+\frac {1}{8} \left (e^{3 i d+\frac {i (3 i e+b \log (f))^2}{12 f}} f^a\right ) \int e^{-\frac {i (3 i e+6 i f x+b \log (f))^2}{12 f}} \, dx \\ & = -\frac {3}{16} \sqrt [4]{-1} e^{\frac {1}{4} i \left (4 d+\frac {(i e+b \log (f))^2}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt [4]{-1} (i e+2 i f x+b \log (f))}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) e^{3 i d+\frac {i (3 i e+b \log (f))^2}{12 f}} f^{-\frac {1}{2}+a} \sqrt {\frac {\pi }{6}} \text {erf}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (3 i e+6 i f x+b \log (f))}{\sqrt {6} \sqrt {f}}\right )-\frac {3}{16} \sqrt [4]{-1} e^{-i d+\frac {i (e+i b \log (f))^2}{4 f}} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erfi}\left (\frac {\sqrt [4]{-1} (i e+2 i f x-b \log (f))}{2 \sqrt {f}}\right )-\left (\frac {1}{16}+\frac {i}{16}\right ) \exp \left (-\frac {1}{12} i \left (36 d+\frac {(3 i e-b \log (f))^2}{f}\right )\right ) f^{-\frac {1}{2}+a} \sqrt {\frac {\pi }{6}} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (3 i e+6 i f x-b \log (f))}{\sqrt {6} \sqrt {f}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 1.10 (sec) , antiderivative size = 322, normalized size of antiderivative = 0.95 \[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=\frac {1}{48} \sqrt [4]{-1} e^{-\frac {i \left (3 e^2+b^2 \log ^2(f)\right )}{4 f}} f^{a-\frac {b e+f}{2 f}} \sqrt {\pi } \left (9 e^{\frac {i \left (e^2+b^2 \log ^2(f)\right )}{2 f}} \text {erfi}\left (\frac {\sqrt [4]{-1} (e+2 f x-i b \log (f))}{2 \sqrt {f}}\right ) (-i \cos (d)+\sin (d))+e^{\frac {i e^2}{f}} \left (-9 \text {erfi}\left (\frac {(-1)^{3/4} (e+2 f x+i b \log (f))}{2 \sqrt {f}}\right ) (\cos (d)-i \sin (d))-\sqrt {3} e^{\frac {i \left (3 e^2+b^2 \log ^2(f)\right )}{6 f}} \text {erfi}\left (\frac {(-1)^{3/4} (3 e+6 f x+i b \log (f))}{2 \sqrt {3} \sqrt {f}}\right ) (\cos (3 d)-i \sin (3 d))\right )+\sqrt {3} e^{\frac {i b^2 \log ^2(f)}{3 f}} \text {erfi}\left (\frac {\left (\frac {1}{2}+\frac {i}{2}\right ) (3 e+6 f x-i b \log (f))}{\sqrt {6} \sqrt {f}}\right ) (-i \cos (3 d)+\sin (3 d))\right ) \]

[In]

Integrate[f^(a + b*x)*Cos[d + e*x + f*x^2]^3,x]

[Out]

((-1)^(1/4)*f^(a - (b*e + f)/(2*f))*Sqrt[Pi]*(9*E^(((I/2)*(e^2 + b^2*Log[f]^2))/f)*Erfi[((-1)^(1/4)*(e + 2*f*x
 - I*b*Log[f]))/(2*Sqrt[f])]*((-I)*Cos[d] + Sin[d]) + E^((I*e^2)/f)*(-9*Erfi[((-1)^(3/4)*(e + 2*f*x + I*b*Log[
f]))/(2*Sqrt[f])]*(Cos[d] - I*Sin[d]) - Sqrt[3]*E^(((I/6)*(3*e^2 + b^2*Log[f]^2))/f)*Erfi[((-1)^(3/4)*(3*e + 6
*f*x + I*b*Log[f]))/(2*Sqrt[3]*Sqrt[f])]*(Cos[3*d] - I*Sin[3*d])) + Sqrt[3]*E^(((I/3)*b^2*Log[f]^2)/f)*Erfi[((
1/2 + I/2)*(3*e + 6*f*x - I*b*Log[f]))/(Sqrt[6]*Sqrt[f])]*((-I)*Cos[3*d] + Sin[3*d])))/(48*E^(((I/4)*(3*e^2 +
b^2*Log[f]^2))/f))

Maple [A] (verified)

Time = 1.82 (sec) , antiderivative size = 315, normalized size of antiderivative = 0.93

method result size
risch \(-\frac {\sqrt {\pi }\, f^{a} f^{-\frac {b e}{2 f}} {\mathrm e}^{-\frac {i \left (\ln \left (f \right )^{2} b^{2}+36 d f -9 e^{2}\right )}{12 f}} \sqrt {3}\, \operatorname {erf}\left (-\sqrt {3}\, \sqrt {i f}\, x +\frac {\left (b \ln \left (f \right )-3 i e \right ) \sqrt {3}}{6 \sqrt {i f}}\right )}{48 \sqrt {i f}}-\frac {3 \sqrt {\pi }\, f^{a} f^{-\frac {b e}{2 f}} {\mathrm e}^{-\frac {i \left (\ln \left (f \right )^{2} b^{2}+4 d f -e^{2}\right )}{4 f}} \operatorname {erf}\left (-\sqrt {i f}\, x +\frac {b \ln \left (f \right )-i e}{2 \sqrt {i f}}\right )}{16 \sqrt {i f}}-\frac {3 \sqrt {\pi }\, f^{a} f^{-\frac {b e}{2 f}} {\mathrm e}^{\frac {i \left (\ln \left (f \right )^{2} b^{2}+4 d f -e^{2}\right )}{4 f}} \operatorname {erf}\left (-\sqrt {-i f}\, x +\frac {i e +b \ln \left (f \right )}{2 \sqrt {-i f}}\right )}{16 \sqrt {-i f}}-\frac {\sqrt {\pi }\, f^{a} f^{-\frac {b e}{2 f}} {\mathrm e}^{\frac {i \left (\ln \left (f \right )^{2} b^{2}+36 d f -9 e^{2}\right )}{12 f}} \operatorname {erf}\left (-\sqrt {-3 i f}\, x +\frac {3 i e +b \ln \left (f \right )}{2 \sqrt {-3 i f}}\right )}{16 \sqrt {-3 i f}}\) \(315\)

[In]

int(f^(b*x+a)*cos(f*x^2+e*x+d)^3,x,method=_RETURNVERBOSE)

[Out]

-1/48*Pi^(1/2)*f^a*f^(-1/2/f*b*e)*exp(-1/12*I*(ln(f)^2*b^2+36*d*f-9*e^2)/f)*3^(1/2)/(I*f)^(1/2)*erf(-3^(1/2)*(
I*f)^(1/2)*x+1/6*(b*ln(f)-3*I*e)*3^(1/2)/(I*f)^(1/2))-3/16*Pi^(1/2)*f^a*f^(-1/2/f*b*e)*exp(-1/4*I*(ln(f)^2*b^2
+4*d*f-e^2)/f)/(I*f)^(1/2)*erf(-(I*f)^(1/2)*x+1/2*(b*ln(f)-I*e)/(I*f)^(1/2))-3/16*Pi^(1/2)*f^a*f^(-1/2/f*b*e)*
exp(1/4*I*(ln(f)^2*b^2+4*d*f-e^2)/f)/(-I*f)^(1/2)*erf(-(-I*f)^(1/2)*x+1/2*(I*e+b*ln(f))/(-I*f)^(1/2))-1/16*Pi^
(1/2)*f^a*f^(-1/2/f*b*e)*exp(1/12*I*(ln(f)^2*b^2+36*d*f-9*e^2)/f)/(-3*I*f)^(1/2)*erf(-(-3*I*f)^(1/2)*x+1/2*(3*
I*e+b*ln(f))/(-3*I*f)^(1/2))

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 629 vs. \(2 (220) = 440\).

Time = 0.27 (sec) , antiderivative size = 629, normalized size of antiderivative = 1.85 \[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=\frac {\sqrt {6} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + 9 i \, e^{2} - 36 i \, d f - 6 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{12 \, f}\right )} \operatorname {C}\left (\frac {\sqrt {6} {\left (6 \, f x + i \, b \log \left (f\right ) + 3 \, e\right )} \sqrt {\frac {f}{\pi }}}{6 \, f}\right ) - \sqrt {6} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} - 9 i \, e^{2} + 36 i \, d f - 6 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{12 \, f}\right )} \operatorname {C}\left (-\frac {\sqrt {6} {\left (6 \, f x - i \, b \log \left (f\right ) + 3 \, e\right )} \sqrt {\frac {f}{\pi }}}{6 \, f}\right ) + 9 \, \sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + i \, e^{2} - 4 i \, d f - 2 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname {C}\left (\frac {\sqrt {2} {\left (2 \, f x + i \, b \log \left (f\right ) + e\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) - 9 \, \sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} - i \, e^{2} + 4 i \, d f - 2 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname {C}\left (-\frac {\sqrt {2} {\left (2 \, f x - i \, b \log \left (f\right ) + e\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) - i \, \sqrt {6} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + 9 i \, e^{2} - 36 i \, d f - 6 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{12 \, f}\right )} \operatorname {S}\left (\frac {\sqrt {6} {\left (6 \, f x + i \, b \log \left (f\right ) + 3 \, e\right )} \sqrt {\frac {f}{\pi }}}{6 \, f}\right ) - i \, \sqrt {6} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} - 9 i \, e^{2} + 36 i \, d f - 6 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{12 \, f}\right )} \operatorname {S}\left (-\frac {\sqrt {6} {\left (6 \, f x - i \, b \log \left (f\right ) + 3 \, e\right )} \sqrt {\frac {f}{\pi }}}{6 \, f}\right ) - 9 i \, \sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + i \, e^{2} - 4 i \, d f - 2 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname {S}\left (\frac {\sqrt {2} {\left (2 \, f x + i \, b \log \left (f\right ) + e\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) - 9 i \, \sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} - i \, e^{2} + 4 i \, d f - 2 \, {\left (b e - 2 \, a f\right )} \log \left (f\right )}{4 \, f}\right )} \operatorname {S}\left (-\frac {\sqrt {2} {\left (2 \, f x - i \, b \log \left (f\right ) + e\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right )}{48 \, f} \]

[In]

integrate(f^(b*x+a)*cos(f*x^2+e*x+d)^3,x, algorithm="fricas")

[Out]

1/48*(sqrt(6)*pi*sqrt(f/pi)*e^(1/12*(-I*b^2*log(f)^2 + 9*I*e^2 - 36*I*d*f - 6*(b*e - 2*a*f)*log(f))/f)*fresnel
_cos(1/6*sqrt(6)*(6*f*x + I*b*log(f) + 3*e)*sqrt(f/pi)/f) - sqrt(6)*pi*sqrt(f/pi)*e^(1/12*(I*b^2*log(f)^2 - 9*
I*e^2 + 36*I*d*f - 6*(b*e - 2*a*f)*log(f))/f)*fresnel_cos(-1/6*sqrt(6)*(6*f*x - I*b*log(f) + 3*e)*sqrt(f/pi)/f
) + 9*sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(-I*b^2*log(f)^2 + I*e^2 - 4*I*d*f - 2*(b*e - 2*a*f)*log(f))/f)*fresnel_cos
(1/2*sqrt(2)*(2*f*x + I*b*log(f) + e)*sqrt(f/pi)/f) - 9*sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(I*b^2*log(f)^2 - I*e^2 +
 4*I*d*f - 2*(b*e - 2*a*f)*log(f))/f)*fresnel_cos(-1/2*sqrt(2)*(2*f*x - I*b*log(f) + e)*sqrt(f/pi)/f) - I*sqrt
(6)*pi*sqrt(f/pi)*e^(1/12*(-I*b^2*log(f)^2 + 9*I*e^2 - 36*I*d*f - 6*(b*e - 2*a*f)*log(f))/f)*fresnel_sin(1/6*s
qrt(6)*(6*f*x + I*b*log(f) + 3*e)*sqrt(f/pi)/f) - I*sqrt(6)*pi*sqrt(f/pi)*e^(1/12*(I*b^2*log(f)^2 - 9*I*e^2 +
36*I*d*f - 6*(b*e - 2*a*f)*log(f))/f)*fresnel_sin(-1/6*sqrt(6)*(6*f*x - I*b*log(f) + 3*e)*sqrt(f/pi)/f) - 9*I*
sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(-I*b^2*log(f)^2 + I*e^2 - 4*I*d*f - 2*(b*e - 2*a*f)*log(f))/f)*fresnel_sin(1/2*s
qrt(2)*(2*f*x + I*b*log(f) + e)*sqrt(f/pi)/f) - 9*I*sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(I*b^2*log(f)^2 - I*e^2 + 4*I
*d*f - 2*(b*e - 2*a*f)*log(f))/f)*fresnel_sin(-1/2*sqrt(2)*(2*f*x - I*b*log(f) + e)*sqrt(f/pi)/f))/f

Sympy [F]

\[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=\int f^{a + b x} \cos ^{3}{\left (d + e x + f x^{2} \right )}\, dx \]

[In]

integrate(f**(b*x+a)*cos(f*x**2+e*x+d)**3,x)

[Out]

Integral(f**(a + b*x)*cos(d + e*x + f*x**2)**3, x)

Maxima [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 377, normalized size of antiderivative = 1.11 \[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=-\frac {9^{\frac {1}{4}} \sqrt {2} \sqrt {\pi } {\left ({\left (-\left (i - 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} - 9 \, e^{2} + 36 \, d f}{12 \, f}\right ) - \left (i + 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} - 9 \, e^{2} + 36 \, d f}{12 \, f}\right )\right )} \operatorname {erf}\left (\frac {i \, {\left (6 i \, f x - b \log \left (f\right ) + 3 i \, e\right )} \sqrt {3 i \, f}}{6 \, f}\right ) + {\left (\left (i + 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} - 9 \, e^{2} + 36 \, d f}{12 \, f}\right ) + \left (i - 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} - 9 \, e^{2} + 36 \, d f}{12 \, f}\right )\right )} \operatorname {erf}\left (\frac {i \, {\left (6 i \, f x + b \log \left (f\right ) + 3 i \, e\right )} \sqrt {-3 i \, f}}{6 \, f}\right )\right )} f^{\frac {3}{2}} - 9 \, \sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} - e^{2} + 4 \, d f}{4 \, f}\right ) + \left (i + 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} - e^{2} + 4 \, d f}{4 \, f}\right )\right )} \operatorname {erf}\left (\frac {i \, {\left (2 i \, f x - b \log \left (f\right ) + i \, e\right )} \sqrt {i \, f}}{2 \, f}\right ) + {\left (-\left (i + 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} - e^{2} + 4 \, d f}{4 \, f}\right ) - \left (i - 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} - e^{2} + 4 \, d f}{4 \, f}\right )\right )} \operatorname {erf}\left (\frac {i \, {\left (2 i \, f x + b \log \left (f\right ) + i \, e\right )} \sqrt {-i \, f}}{2 \, f}\right )\right )} f^{\frac {3}{2}}}{96 \, f^{2} f^{\frac {b e}{2 \, f}}} \]

[In]

integrate(f^(b*x+a)*cos(f*x^2+e*x+d)^3,x, algorithm="maxima")

[Out]

-1/96*(9^(1/4)*sqrt(2)*sqrt(pi)*((-(I - 1)*f^a*cos(1/12*(b^2*log(f)^2 - 9*e^2 + 36*d*f)/f) - (I + 1)*f^a*sin(1
/12*(b^2*log(f)^2 - 9*e^2 + 36*d*f)/f))*erf(1/6*I*(6*I*f*x - b*log(f) + 3*I*e)*sqrt(3*I*f)/f) + ((I + 1)*f^a*c
os(1/12*(b^2*log(f)^2 - 9*e^2 + 36*d*f)/f) + (I - 1)*f^a*sin(1/12*(b^2*log(f)^2 - 9*e^2 + 36*d*f)/f))*erf(1/6*
I*(6*I*f*x + b*log(f) + 3*I*e)*sqrt(-3*I*f)/f))*f^(3/2) - 9*sqrt(2)*sqrt(pi)*(((I - 1)*f^a*cos(1/4*(b^2*log(f)
^2 - e^2 + 4*d*f)/f) + (I + 1)*f^a*sin(1/4*(b^2*log(f)^2 - e^2 + 4*d*f)/f))*erf(1/2*I*(2*I*f*x - b*log(f) + I*
e)*sqrt(I*f)/f) + (-(I + 1)*f^a*cos(1/4*(b^2*log(f)^2 - e^2 + 4*d*f)/f) - (I - 1)*f^a*sin(1/4*(b^2*log(f)^2 -
e^2 + 4*d*f)/f))*erf(1/2*I*(2*I*f*x + b*log(f) + I*e)*sqrt(-I*f)/f))*f^(3/2))/(f^2*f^(1/2*b*e/f))

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 751 vs. \(2 (220) = 440\).

Time = 0.49 (sec) , antiderivative size = 751, normalized size of antiderivative = 2.21 \[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=\text {Too large to display} \]

[In]

integrate(f^(b*x+a)*cos(f*x^2+e*x+d)^3,x, algorithm="giac")

[Out]

3/16*I*sqrt(2)*sqrt(pi)*erf(-1/8*I*sqrt(2)*(4*x - (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)) - 2*e)/f)*(I*f/abs(f
) + 1)*sqrt(abs(f)))*e^(1/8*I*pi^2*b^2*sgn(f)/f + 1/4*pi*b^2*log(abs(f))*sgn(f)/f - 1/8*I*pi^2*b^2/f - 1/4*pi*
b^2*log(abs(f))/f + 1/4*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/4*I*pi*b*e*sgn(f)/f + 1/2*I*pi*a - 1/4*I
*pi*b*e/f + a*log(abs(f)) - 1/2*b*e*log(abs(f))/f + I*d - 1/4*I*e^2/f)/((I*f/abs(f) + 1)*sqrt(abs(f))) + 1/48*
I*sqrt(6)*sqrt(pi)*erf(-1/24*I*sqrt(6)*sqrt(f)*(12*x - (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)) - 6*e)/f)*(I*f/
abs(f) + 1))*e^(1/24*I*pi^2*b^2*sgn(f)/f + 1/12*pi*b^2*log(abs(f))*sgn(f)/f - 1/24*I*pi^2*b^2/f - 1/12*pi*b^2*
log(abs(f))/f + 1/12*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/4*I*pi*b*e*sgn(f)/f + 1/2*I*pi*a - 1/4*I*pi
*b*e/f + a*log(abs(f)) - 1/2*b*e*log(abs(f))/f + 3*I*d - 3/4*I*e^2/f)/(sqrt(f)*(I*f/abs(f) + 1)) - 1/48*I*sqrt
(6)*sqrt(pi)*erf(1/24*I*sqrt(6)*sqrt(f)*(12*x + (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)) + 6*e)/f)*(-I*f/abs(f)
 + 1))*e^(-1/24*I*pi^2*b^2*sgn(f)/f - 1/12*pi*b^2*log(abs(f))*sgn(f)/f + 1/24*I*pi^2*b^2/f + 1/12*pi*b^2*log(a
bs(f))/f - 1/12*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/4*I*pi*b*e*sgn(f)/f + 1/2*I*pi*a - 1/4*I*pi*b*e/
f + a*log(abs(f)) - 1/2*b*e*log(abs(f))/f - 3*I*d + 3/4*I*e^2/f)/(sqrt(f)*(-I*f/abs(f) + 1)) - 3/16*I*sqrt(2)*
sqrt(pi)*erf(1/8*I*sqrt(2)*(4*x + (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)) + 2*e)/f)*(-I*f/abs(f) + 1)*sqrt(abs
(f)))*e^(-1/8*I*pi^2*b^2*sgn(f)/f - 1/4*pi*b^2*log(abs(f))*sgn(f)/f + 1/8*I*pi^2*b^2/f + 1/4*pi*b^2*log(abs(f)
)/f - 1/4*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/4*I*pi*b*e*sgn(f)/f + 1/2*I*pi*a - 1/4*I*pi*b*e/f + a*
log(abs(f)) - 1/2*b*e*log(abs(f))/f - I*d + 1/4*I*e^2/f)/((-I*f/abs(f) + 1)*sqrt(abs(f)))

Mupad [F(-1)]

Timed out. \[ \int f^{a+b x} \cos ^3\left (d+e x+f x^2\right ) \, dx=\int f^{a+b\,x}\,{\cos \left (f\,x^2+e\,x+d\right )}^3 \,d x \]

[In]

int(f^(a + b*x)*cos(d + e*x + f*x^2)^3,x)

[Out]

int(f^(a + b*x)*cos(d + e*x + f*x^2)^3, x)